package com.speechb.modules.listener;

import javax.servlet.annotation.WebListener;
import javax.servlet.http.HttpSessionAttributeListener;
import javax.servlet.http.HttpSessionBindingEvent;

/**
 * session监听器
 * @author Administrator
 */
@WebListener
public class SessionListener implements HttpSessionAttributeListener {

    private int onlineCount = 0;//记录session的数量


    @Override
    public void attributeAdded(HttpSessionBindingEvent se) {
        System.out.println("来了");
    }

    @Override
    public void attributeRemoved(HttpSessionBindingEvent se) {

    }

    @Override
    public void attributeReplaced(HttpSessionBindingEvent se) {

    }
}